/**
 * @Author Fish Paradise
 * @Description
 * @Date 2019/1/14  20:24
 **/
public class Test {
    public static void main(String[] args) {
        BookShelf bookShelf = new BookShelf();
        bookShelf.appendBook(new Book("123"));
        bookShelf.appendBook(new Book("456"));
        bookShelf.appendBook(new Book("789"));
        bookShelf.appendBook(new Book("111"));

        BookIterator iterator = bookShelf.iterator();
        while (iterator.hasNext()){
            System.out.println(iterator.next().getName());
        }
    }
}
